<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>shark::Centroids Class Reference</title>
<script type="text/javaScript" src="search/search.js"></script>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3.0.1/es5/tex-mml-chtml.js"></script>
<script src="../../mlstyle.js"></script>
<link href="../css/besser.css" rel="stylesheet" type="text/css"/>
</head>
<!-- pretty cool: each body gets an id tag which is the basename of the web page  -->
<!--              and allows for page-specific CSS. this is client-side scripted, -->
<!--              so the id will not yet show up in the served source code -->
<script type="text/javascript">
    jQuery(document).ready(function () {
        var url = jQuery(location).attr('href');
        var pname = url.substr(url.lastIndexOf("/")+1, url.lastIndexOf(".")-url.lastIndexOf("/")-1);
        jQuery('#this_url').html('<strong>' + pname + '</strong>');
        jQuery('body').attr('id', pname);
    });
</script>
<body>
    <div id="shark_old">
        <div id="wrap">
            <div id="header">
                <div id="site-name"><a href="../../sphinx_pages/build/html/index.html">Shark machine learning library</a></div>
                <ul id="nav">
                    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/installation.html">Installation</a>
                    </li>
		    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/tutorials/tutorials.html">Tutorials</a>
                    </li>
		    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/benchmark.html">Benchmarks</a>
                    </li>
                    <li class="active">
                        <a href="classes.html">Documentation</a>
                        <ul>
                            <li class="first"></li>
                            <li><a href="../../sphinx_pages/build/html/rest_sources/quickref/quickref.html">Quick references</a></li>
                            <li><a href="classes.html">Class list</a></li>
                            <li class="last"><a href="group__shark__globals.html">Global functions</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
        </div>
    </div>
<div id="doxywrapper">
<!--
    <div id="global_doxytitle">Doxygen<br>Documentation:</div>
-->
    <div id="navrow_wrapper">
<!-- Generated by Doxygen 1.9.8 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceshark.html">shark</a></li><li class="navelem"><a class="el" href="classshark_1_1_centroids.html">Centroids</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="classshark_1_1_centroids-members.html">List of all members</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a>  </div>
  <div class="headertitle"><div class="title">shark::Centroids Class Reference<div class="ingroups"><a class="el" href="group__models.html">Models</a> &raquo; <a class="el" href="group__clustering.html">Clustering Algorithms</a></div></div></div>
</div><!--header-->
<div class="contents">

<p>Clusters defined by centroids.  
 <a href="classshark_1_1_centroids.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_centroids_8h_source.html">shark/Models/Clustering/Centroids.h</a>&gt;</code></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for shark::Centroids:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><img src="classshark_1_1_centroids__inherit__graph.png" border="0" usemap="#ashark_1_1_centroids_inherit__map" alt="Inheritance graph"/></div>
<map name="ashark_1_1_centroids_inherit__map" id="ashark_1_1_centroids_inherit__map">
<area shape="rect" title="Clusters defined by centroids." alt="" coords="31,94,149,120"/>
<area shape="rect" href="classshark_1_1_abstract_clustering.html" title=" " alt="" coords="5,5,175,46"/>
<area shape="poly" title=" " alt="" coords="93,62,93,93,87,93,87,62"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ab83a899ae20f7e40bfbe6e84688b9401" id="r_ab83a899ae20f7e40bfbe6e84688b9401"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_d_l_l_support_8h.html#a54b73283f7f70b27fbd8ac5d4621827f">SHARK_EXPORT_SYMBOL</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_centroids.html#ab83a899ae20f7e40bfbe6e84688b9401">Centroids</a> ()</td></tr>
<tr class="memdesc:ab83a899ae20f7e40bfbe6e84688b9401"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor.  <br /></td></tr>
<tr class="separator:ab83a899ae20f7e40bfbe6e84688b9401"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2679c9e18bee09d905fdc51fafead23c" id="r_a2679c9e18bee09d905fdc51fafead23c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_d_l_l_support_8h.html#a54b73283f7f70b27fbd8ac5d4621827f">SHARK_EXPORT_SYMBOL</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_centroids.html#a2679c9e18bee09d905fdc51fafead23c">Centroids</a> (std::size_t <a class="el" href="classshark_1_1_centroids.html#a8dcfd9a069a3ea8456e126138f3dee37">centroids</a>, std::size_t dimension)</td></tr>
<tr class="separator:a2679c9e18bee09d905fdc51fafead23c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a26f48dd5f3fc482be5d09c8b706a883b" id="r_a26f48dd5f3fc482be5d09c8b706a883b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_d_l_l_support_8h.html#a54b73283f7f70b27fbd8ac5d4621827f">SHARK_EXPORT_SYMBOL</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_centroids.html#a26f48dd5f3fc482be5d09c8b706a883b">Centroids</a> (<a class="el" href="classshark_1_1_data.html">Data</a>&lt; RealVector &gt; const &amp;<a class="el" href="classshark_1_1_centroids.html#a8dcfd9a069a3ea8456e126138f3dee37">centroids</a>)</td></tr>
<tr class="separator:a26f48dd5f3fc482be5d09c8b706a883b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a82a973c9374f34c44c68fd3c1a15f0d2" id="r_a82a973c9374f34c44c68fd3c1a15f0d2"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_centroids.html#a82a973c9374f34c44c68fd3c1a15f0d2">name</a> () const</td></tr>
<tr class="memdesc:a82a973c9374f34c44c68fd3c1a15f0d2"><td class="mdescLeft">&#160;</td><td class="mdescRight">From <a class="el" href="classshark_1_1_i_nameable.html" title="This class is an interface for all objects which can have a name.">INameable</a>: return the class name.  <br /></td></tr>
<tr class="separator:a82a973c9374f34c44c68fd3c1a15f0d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeda09ff6d0c326df4c90eb3ebe2d214a" id="r_aeda09ff6d0c326df4c90eb3ebe2d214a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_d_l_l_support_8h.html#a54b73283f7f70b27fbd8ac5d4621827f">SHARK_EXPORT_SYMBOL</a> RealVector&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_centroids.html#aeda09ff6d0c326df4c90eb3ebe2d214a">parameterVector</a> () const</td></tr>
<tr class="memdesc:aeda09ff6d0c326df4c90eb3ebe2d214a"><td class="mdescLeft">&#160;</td><td class="mdescRight">from <a class="el" href="classshark_1_1_i_parameterizable.html" title="Top level interface for everything that holds parameters.">IParameterizable</a>  <br /></td></tr>
<tr class="separator:aeda09ff6d0c326df4c90eb3ebe2d214a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a130828c5db33fe9c2b8a839a972889d3" id="r_a130828c5db33fe9c2b8a839a972889d3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_d_l_l_support_8h.html#a54b73283f7f70b27fbd8ac5d4621827f">SHARK_EXPORT_SYMBOL</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_centroids.html#a130828c5db33fe9c2b8a839a972889d3">setParameterVector</a> (RealVector const &amp;newParameters)</td></tr>
<tr class="memdesc:a130828c5db33fe9c2b8a839a972889d3"><td class="mdescLeft">&#160;</td><td class="mdescRight">from <a class="el" href="classshark_1_1_i_parameterizable.html" title="Top level interface for everything that holds parameters.">IParameterizable</a>  <br /></td></tr>
<tr class="separator:a130828c5db33fe9c2b8a839a972889d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3b61acaed4a72c56a3c3e22918e0b1ae" id="r_a3b61acaed4a72c56a3c3e22918e0b1ae"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_d_l_l_support_8h.html#a54b73283f7f70b27fbd8ac5d4621827f">SHARK_EXPORT_SYMBOL</a> std::size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_centroids.html#a3b61acaed4a72c56a3c3e22918e0b1ae">numberOfParameters</a> () const</td></tr>
<tr class="memdesc:a3b61acaed4a72c56a3c3e22918e0b1ae"><td class="mdescLeft">&#160;</td><td class="mdescRight">from <a class="el" href="classshark_1_1_i_parameterizable.html" title="Top level interface for everything that holds parameters.">IParameterizable</a>  <br /></td></tr>
<tr class="separator:a3b61acaed4a72c56a3c3e22918e0b1ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a162b069a4d71fcec6e7dae5c8251cb2f" id="r_a162b069a4d71fcec6e7dae5c8251cb2f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classshark_1_1_shape.html">Shape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_centroids.html#a162b069a4d71fcec6e7dae5c8251cb2f">inputShape</a> () const</td></tr>
<tr class="memdesc:a162b069a4d71fcec6e7dae5c8251cb2f"><td class="mdescLeft">&#160;</td><td class="mdescRight">return the dimension of the inputs  <br /></td></tr>
<tr class="separator:a162b069a4d71fcec6e7dae5c8251cb2f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3a1d11a1cee40cfb080b56ba037920b9" id="r_a3a1d11a1cee40cfb080b56ba037920b9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_d_l_l_support_8h.html#a54b73283f7f70b27fbd8ac5d4621827f">SHARK_EXPORT_SYMBOL</a> std::size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_centroids.html#a3a1d11a1cee40cfb080b56ba037920b9">numberOfClusters</a> () const</td></tr>
<tr class="memdesc:a3a1d11a1cee40cfb080b56ba037920b9"><td class="mdescLeft">&#160;</td><td class="mdescRight">return the number of centroids in the model  <br /></td></tr>
<tr class="separator:a3a1d11a1cee40cfb080b56ba037920b9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8dcfd9a069a3ea8456e126138f3dee37" id="r_a8dcfd9a069a3ea8456e126138f3dee37"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classshark_1_1_data.html">Data</a>&lt; RealVector &gt; const &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_centroids.html#a8dcfd9a069a3ea8456e126138f3dee37">centroids</a> () const</td></tr>
<tr class="memdesc:a8dcfd9a069a3ea8456e126138f3dee37"><td class="mdescLeft">&#160;</td><td class="mdescRight">read access to the centroid vectors  <br /></td></tr>
<tr class="separator:a8dcfd9a069a3ea8456e126138f3dee37"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a45d2dd06b31f49dc53a4697e8d368693" id="r_a45d2dd06b31f49dc53a4697e8d368693"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_centroids.html#a45d2dd06b31f49dc53a4697e8d368693">setCentroids</a> (<a class="el" href="classshark_1_1_data.html">Data</a>&lt; RealVector &gt; const &amp;newCentroids)</td></tr>
<tr class="memdesc:a45d2dd06b31f49dc53a4697e8d368693"><td class="mdescLeft">&#160;</td><td class="mdescRight">overwrite the centroid vectors  <br /></td></tr>
<tr class="separator:a45d2dd06b31f49dc53a4697e8d368693"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aac250dde37c2e65581d3f9714891e04d" id="r_aac250dde37c2e65581d3f9714891e04d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_d_l_l_support_8h.html#a54b73283f7f70b27fbd8ac5d4621827f">SHARK_EXPORT_SYMBOL</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_centroids.html#aac250dde37c2e65581d3f9714891e04d">read</a> (<a class="el" href="namespaceshark.html#ada68729491840669e47c8ad42282424f">InArchive</a> &amp;archive)</td></tr>
<tr class="memdesc:aac250dde37c2e65581d3f9714891e04d"><td class="mdescLeft">&#160;</td><td class="mdescRight">from <a class="el" href="classshark_1_1_i_serializable.html" title="Abstracts serializing functionality.">ISerializable</a>  <br /></td></tr>
<tr class="separator:aac250dde37c2e65581d3f9714891e04d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a47f8243d170bf0c732a7c100b47574b5" id="r_a47f8243d170bf0c732a7c100b47574b5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_d_l_l_support_8h.html#a54b73283f7f70b27fbd8ac5d4621827f">SHARK_EXPORT_SYMBOL</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_centroids.html#a47f8243d170bf0c732a7c100b47574b5">write</a> (<a class="el" href="namespaceshark.html#af4f8eb8e9618f5236b71bbcb12b8a524">OutArchive</a> &amp;archive) const</td></tr>
<tr class="memdesc:a47f8243d170bf0c732a7c100b47574b5"><td class="mdescLeft">&#160;</td><td class="mdescRight">from <a class="el" href="classshark_1_1_i_serializable.html" title="Abstracts serializing functionality.">ISerializable</a>  <br /></td></tr>
<tr class="separator:a47f8243d170bf0c732a7c100b47574b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a27c10e06b07d4e747db2cfc939020e5f" id="r_a27c10e06b07d4e747db2cfc939020e5f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_d_l_l_support_8h.html#a54b73283f7f70b27fbd8ac5d4621827f">SHARK_EXPORT_SYMBOL</a> RealVector&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_centroids.html#a27c10e06b07d4e747db2cfc939020e5f">softMembership</a> (RealVector const &amp;pattern) const</td></tr>
<tr class="memdesc:a27c10e06b07d4e747db2cfc939020e5f"><td class="mdescLeft">&#160;</td><td class="mdescRight">from <a class="el" href="classshark_1_1_abstract_clustering.html" title="Base class for clustering.">AbstractClustering</a>: Compute cluster memberships.  <br /></td></tr>
<tr class="separator:a27c10e06b07d4e747db2cfc939020e5f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac8b603c938cfa98e3da02cd5f704d7f8" id="r_ac8b603c938cfa98e3da02cd5f704d7f8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_d_l_l_support_8h.html#a54b73283f7f70b27fbd8ac5d4621827f">SHARK_EXPORT_SYMBOL</a> RealMatrix&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_centroids.html#ac8b603c938cfa98e3da02cd5f704d7f8">softMembership</a> (<a class="el" href="classshark_1_1_abstract_clustering.html#a6865af40b0cab718706e9360b29f2a2c">BatchInputType</a> const &amp;patterns) const</td></tr>
<tr class="memdesc:ac8b603c938cfa98e3da02cd5f704d7f8"><td class="mdescLeft">&#160;</td><td class="mdescRight">From <a class="el" href="classshark_1_1_abstract_clustering.html" title="Base class for clustering.">AbstractClustering</a>: Compute cluster memberships for a batch of patterns.  <br /></td></tr>
<tr class="separator:ac8b603c938cfa98e3da02cd5f704d7f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa60e316c9166e3a61903dceadfdd0785" id="r_aa60e316c9166e3a61903dceadfdd0785"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_d_l_l_support_8h.html#a54b73283f7f70b27fbd8ac5d4621827f">SHARK_EXPORT_SYMBOL</a> RealMatrix&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_centroids.html#aa60e316c9166e3a61903dceadfdd0785">distances</a> (<a class="el" href="classshark_1_1_abstract_clustering.html#a6865af40b0cab718706e9360b29f2a2c">BatchInputType</a> const &amp;patterns) const</td></tr>
<tr class="memdesc:aa60e316c9166e3a61903dceadfdd0785"><td class="mdescLeft">&#160;</td><td class="mdescRight">Computes the distances of each pattern to all cluster centers.  <br /></td></tr>
<tr class="separator:aa60e316c9166e3a61903dceadfdd0785"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a15454f974bdf8167ef231941a7a54c6b" id="r_a15454f974bdf8167ef231941a7a54c6b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_d_l_l_support_8h.html#a54b73283f7f70b27fbd8ac5d4621827f">SHARK_EXPORT_SYMBOL</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_centroids.html#a15454f974bdf8167ef231941a7a54c6b">initFromData</a> (<a class="el" href="namespaceshark.html#a3bbb2342e6c3a856ef63e37f8a02396a">ClassificationDataset</a> const &amp;data, std::size_t noClusters=0, std::size_t noClasses=0)</td></tr>
<tr class="separator:a15454f974bdf8167ef231941a7a54c6b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a43ac4993cd3d7178e77740e7831869e5" id="r_a43ac4993cd3d7178e77740e7831869e5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_d_l_l_support_8h.html#a54b73283f7f70b27fbd8ac5d4621827f">SHARK_EXPORT_SYMBOL</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_centroids.html#a43ac4993cd3d7178e77740e7831869e5">initFromData</a> (<a class="el" href="classshark_1_1_data.html">Data</a>&lt; RealVector &gt; const &amp;dataset, std::size_t noClusters)</td></tr>
<tr class="separator:a43ac4993cd3d7178e77740e7831869e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classshark_1_1_abstract_clustering"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classshark_1_1_abstract_clustering')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classshark_1_1_abstract_clustering.html">shark::AbstractClustering&lt; RealVector &gt;</a></td></tr>
<tr class="memitem:a75bdfc87e939ec6310fc3ea8fd7e1f49 inherit pub_methods_classshark_1_1_abstract_clustering" id="r_a75bdfc87e939ec6310fc3ea8fd7e1f49"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classshark_1_1_abstract_clustering.html#a981308504604ce9fb03222b07f28a5b7">Features</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_clustering.html#a75bdfc87e939ec6310fc3ea8fd7e1f49">features</a> () const</td></tr>
<tr class="separator:a75bdfc87e939ec6310fc3ea8fd7e1f49 inherit pub_methods_classshark_1_1_abstract_clustering"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a320b9fed0c193643f47977269f83a3b6 inherit pub_methods_classshark_1_1_abstract_clustering" id="r_a320b9fed0c193643f47977269f83a3b6"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_clustering.html#a320b9fed0c193643f47977269f83a3b6">updateFeatures</a> ()</td></tr>
<tr class="separator:a320b9fed0c193643f47977269f83a3b6 inherit pub_methods_classshark_1_1_abstract_clustering"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a48971e367865d932891873c21cb4e849 inherit pub_methods_classshark_1_1_abstract_clustering" id="r_a48971e367865d932891873c21cb4e849"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_clustering.html#a48971e367865d932891873c21cb4e849">hasSoftMembershipFunction</a> () const</td></tr>
<tr class="separator:a48971e367865d932891873c21cb4e849 inherit pub_methods_classshark_1_1_abstract_clustering"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1b9a35a33f14aab84aac1cbf767bb813 inherit pub_methods_classshark_1_1_abstract_clustering" id="r_a1b9a35a33f14aab84aac1cbf767bb813"><td class="memItemLeft" align="right" valign="top">virtual unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_clustering.html#a1b9a35a33f14aab84aac1cbf767bb813">hardMembership</a> (<a class="el" href="classshark_1_1_abstract_clustering.html#a519bea30fafabdaff33a85a1c27b8a85">InputType</a> const &amp;pattern) const</td></tr>
<tr class="memdesc:a1b9a35a33f14aab84aac1cbf767bb813 inherit pub_methods_classshark_1_1_abstract_clustering"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute best matching cluster.  <br /></td></tr>
<tr class="separator:a1b9a35a33f14aab84aac1cbf767bb813 inherit pub_methods_classshark_1_1_abstract_clustering"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af11841eae50fa5d031a7a6706e0fa9d9 inherit pub_methods_classshark_1_1_abstract_clustering" id="r_af11841eae50fa5d031a7a6706e0fa9d9"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classshark_1_1_abstract_clustering.html#a0857a0698bf699be93ccf595406bdf96">BatchOutputType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_clustering.html#af11841eae50fa5d031a7a6706e0fa9d9">hardMembership</a> (<a class="el" href="classshark_1_1_abstract_clustering.html#a6865af40b0cab718706e9360b29f2a2c">BatchInputType</a> const &amp;patterns) const</td></tr>
<tr class="memdesc:af11841eae50fa5d031a7a6706e0fa9d9 inherit pub_methods_classshark_1_1_abstract_clustering"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute best matching cluster for a batch of inputs.  <br /></td></tr>
<tr class="separator:af11841eae50fa5d031a7a6706e0fa9d9 inherit pub_methods_classshark_1_1_abstract_clustering"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classshark_1_1_i_nameable"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classshark_1_1_i_nameable')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classshark_1_1_i_nameable.html">shark::INameable</a></td></tr>
<tr class="memitem:a877dbdfc6b58ea836495143cea44a98c inherit pub_methods_classshark_1_1_i_nameable" id="r_a877dbdfc6b58ea836495143cea44a98c"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_nameable.html#a877dbdfc6b58ea836495143cea44a98c">~INameable</a> ()</td></tr>
<tr class="separator:a877dbdfc6b58ea836495143cea44a98c inherit pub_methods_classshark_1_1_i_nameable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classshark_1_1_i_parameterizable"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classshark_1_1_i_parameterizable')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classshark_1_1_i_parameterizable.html">shark::IParameterizable&lt; VectorType &gt;</a></td></tr>
<tr class="memitem:a9e3a11172e74d1aa7292f3de4e2b6ebc inherit pub_methods_classshark_1_1_i_parameterizable" id="r_a9e3a11172e74d1aa7292f3de4e2b6ebc"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_parameterizable.html#a9e3a11172e74d1aa7292f3de4e2b6ebc">~IParameterizable</a> ()</td></tr>
<tr class="separator:a9e3a11172e74d1aa7292f3de4e2b6ebc inherit pub_methods_classshark_1_1_i_parameterizable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classshark_1_1_i_serializable"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classshark_1_1_i_serializable')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classshark_1_1_i_serializable.html">shark::ISerializable</a></td></tr>
<tr class="memitem:a7baa9ce108d7278822297ce15882782a inherit pub_methods_classshark_1_1_i_serializable" id="r_a7baa9ce108d7278822297ce15882782a"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_serializable.html#a7baa9ce108d7278822297ce15882782a">~ISerializable</a> ()</td></tr>
<tr class="memdesc:a7baa9ce108d7278822297ce15882782a inherit pub_methods_classshark_1_1_i_serializable"><td class="mdescLeft">&#160;</td><td class="mdescRight">Virtual d'tor.  <br /></td></tr>
<tr class="separator:a7baa9ce108d7278822297ce15882782a inherit pub_methods_classshark_1_1_i_serializable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abdda0c5b8e065b8afbac2cba8f58e841 inherit pub_methods_classshark_1_1_i_serializable" id="r_abdda0c5b8e065b8afbac2cba8f58e841"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_serializable.html#abdda0c5b8e065b8afbac2cba8f58e841">load</a> (<a class="el" href="namespaceshark.html#ada68729491840669e47c8ad42282424f">InArchive</a> &amp;archive, unsigned int version)</td></tr>
<tr class="memdesc:abdda0c5b8e065b8afbac2cba8f58e841 inherit pub_methods_classshark_1_1_i_serializable"><td class="mdescLeft">&#160;</td><td class="mdescRight">Versioned loading of components, calls read(...).  <br /></td></tr>
<tr class="separator:abdda0c5b8e065b8afbac2cba8f58e841 inherit pub_methods_classshark_1_1_i_serializable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5bf66fa8db15cc529bec98976a2f5255 inherit pub_methods_classshark_1_1_i_serializable" id="r_a5bf66fa8db15cc529bec98976a2f5255"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_serializable.html#a5bf66fa8db15cc529bec98976a2f5255">save</a> (<a class="el" href="namespaceshark.html#af4f8eb8e9618f5236b71bbcb12b8a524">OutArchive</a> &amp;archive, unsigned int version) const</td></tr>
<tr class="memdesc:a5bf66fa8db15cc529bec98976a2f5255 inherit pub_methods_classshark_1_1_i_serializable"><td class="mdescLeft">&#160;</td><td class="mdescRight">Versioned storing of components, calls write(...).  <br /></td></tr>
<tr class="separator:a5bf66fa8db15cc529bec98976a2f5255 inherit pub_methods_classshark_1_1_i_serializable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4560a94e8f4908fe8627e41e7d965735 inherit pub_methods_classshark_1_1_i_serializable" id="r_a4560a94e8f4908fe8627e41e7d965735"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_serializable.html#a4560a94e8f4908fe8627e41e7d965735">BOOST_SERIALIZATION_SPLIT_MEMBER</a> ()</td></tr>
<tr class="separator:a4560a94e8f4908fe8627e41e7d965735 inherit pub_methods_classshark_1_1_i_serializable"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pro-methods" name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a76f29a0b624229842ae413d8538a7e72" id="r_a76f29a0b624229842ae413d8538a7e72"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="_d_l_l_support_8h.html#a54b73283f7f70b27fbd8ac5d4621827f">SHARK_EXPORT_SYMBOL</a> double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_centroids.html#a76f29a0b624229842ae413d8538a7e72">membershipKernel</a> (double dist) const</td></tr>
<tr class="separator:a76f29a0b624229842ae413d8538a7e72"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pro-attribs" name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a8e83776854b0e78d1357e7ef880db67f" id="r_a8e83776854b0e78d1357e7ef880db67f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classshark_1_1_data.html">Data</a>&lt; RealVector &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_centroids.html#a8e83776854b0e78d1357e7ef880db67f">m_centroids</a></td></tr>
<tr class="memdesc:a8e83776854b0e78d1357e7ef880db67f"><td class="mdescLeft">&#160;</td><td class="mdescRight">centroid vectors  <br /></td></tr>
<tr class="separator:a8e83776854b0e78d1357e7ef880db67f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pro_attribs_classshark_1_1_abstract_clustering"><td colspan="2" onclick="javascript:toggleInherit('pro_attribs_classshark_1_1_abstract_clustering')"><img src="closed.png" alt="-"/>&#160;Protected Attributes inherited from <a class="el" href="classshark_1_1_abstract_clustering.html">shark::AbstractClustering&lt; RealVector &gt;</a></td></tr>
<tr class="memitem:a75910ba675486528e27893a95608510d inherit pro_attribs_classshark_1_1_abstract_clustering" id="r_a75910ba675486528e27893a95608510d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classshark_1_1_abstract_clustering.html#a981308504604ce9fb03222b07f28a5b7">Features</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_clustering.html#a75910ba675486528e27893a95608510d">m_features</a></td></tr>
<tr class="separator:a75910ba675486528e27893a95608510d inherit pro_attribs_classshark_1_1_abstract_clustering"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="inherited" name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pub_types_classshark_1_1_abstract_clustering"><td colspan="2" onclick="javascript:toggleInherit('pub_types_classshark_1_1_abstract_clustering')"><img src="closed.png" alt="-"/>&#160;Public Types inherited from <a class="el" href="classshark_1_1_abstract_clustering.html">shark::AbstractClustering&lt; RealVector &gt;</a></td></tr>
<tr class="memitem:a2e5bf11e84922991bf66f4198a96e4e7 inherit pub_types_classshark_1_1_abstract_clustering" id="r_a2e5bf11e84922991bf66f4198a96e4e7"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_clustering.html#a2e5bf11e84922991bf66f4198a96e4e7">Feature</a> </td></tr>
<tr class="separator:a2e5bf11e84922991bf66f4198a96e4e7 inherit pub_types_classshark_1_1_abstract_clustering"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a519bea30fafabdaff33a85a1c27b8a85 inherit pub_types_classshark_1_1_abstract_clustering" id="r_a519bea30fafabdaff33a85a1c27b8a85"><td class="memItemLeft" align="right" valign="top">typedef RealVector&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_clustering.html#a519bea30fafabdaff33a85a1c27b8a85">InputType</a></td></tr>
<tr class="separator:a519bea30fafabdaff33a85a1c27b8a85 inherit pub_types_classshark_1_1_abstract_clustering"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a42901ac7a67744a4dd7c785bb9407d7c inherit pub_types_classshark_1_1_abstract_clustering" id="r_a42901ac7a67744a4dd7c785bb9407d7c"><td class="memItemLeft" align="right" valign="top">typedef unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_clustering.html#a42901ac7a67744a4dd7c785bb9407d7c">OutputType</a></td></tr>
<tr class="separator:a42901ac7a67744a4dd7c785bb9407d7c inherit pub_types_classshark_1_1_abstract_clustering"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6865af40b0cab718706e9360b29f2a2c inherit pub_types_classshark_1_1_abstract_clustering" id="r_a6865af40b0cab718706e9360b29f2a2c"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="structshark_1_1_batch.html">Batch</a>&lt; <a class="el" href="classshark_1_1_abstract_clustering.html#a519bea30fafabdaff33a85a1c27b8a85">InputType</a> &gt;::type&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_clustering.html#a6865af40b0cab718706e9360b29f2a2c">BatchInputType</a></td></tr>
<tr class="separator:a6865af40b0cab718706e9360b29f2a2c inherit pub_types_classshark_1_1_abstract_clustering"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0857a0698bf699be93ccf595406bdf96 inherit pub_types_classshark_1_1_abstract_clustering" id="r_a0857a0698bf699be93ccf595406bdf96"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="structshark_1_1_batch.html">Batch</a>&lt; <a class="el" href="classshark_1_1_abstract_clustering.html#a42901ac7a67744a4dd7c785bb9407d7c">OutputType</a> &gt;::type&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_clustering.html#a0857a0698bf699be93ccf595406bdf96">BatchOutputType</a></td></tr>
<tr class="separator:a0857a0698bf699be93ccf595406bdf96 inherit pub_types_classshark_1_1_abstract_clustering"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a981308504604ce9fb03222b07f28a5b7 inherit pub_types_classshark_1_1_abstract_clustering" id="r_a981308504604ce9fb03222b07f28a5b7"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classshark_1_1_typed_flags.html">TypedFlags</a>&lt; <a class="el" href="classshark_1_1_abstract_clustering.html#a2e5bf11e84922991bf66f4198a96e4e7">Feature</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_clustering.html#a981308504604ce9fb03222b07f28a5b7">Features</a></td></tr>
<tr class="separator:a981308504604ce9fb03222b07f28a5b7 inherit pub_types_classshark_1_1_abstract_clustering"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad7affb5327cd577e528b50405564ca71 inherit pub_types_classshark_1_1_abstract_clustering" id="r_ad7affb5327cd577e528b50405564ca71"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classshark_1_1_typed_feature_not_available_exception.html">TypedFeatureNotAvailableException</a>&lt; <a class="el" href="classshark_1_1_abstract_clustering.html#a2e5bf11e84922991bf66f4198a96e4e7">Feature</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_clustering.html#ad7affb5327cd577e528b50405564ca71">FeatureNotAvailableException</a></td></tr>
<tr class="separator:ad7affb5327cd577e528b50405564ca71 inherit pub_types_classshark_1_1_abstract_clustering"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_types_classshark_1_1_i_parameterizable"><td colspan="2" onclick="javascript:toggleInherit('pub_types_classshark_1_1_i_parameterizable')"><img src="closed.png" alt="-"/>&#160;Public Types inherited from <a class="el" href="classshark_1_1_i_parameterizable.html">shark::IParameterizable&lt; VectorType &gt;</a></td></tr>
<tr class="memitem:a2ad5e2e60b2b352988b41f46024d790b inherit pub_types_classshark_1_1_i_parameterizable" id="r_a2ad5e2e60b2b352988b41f46024d790b"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="_c_svm_linear_8cpp.html#ab106d665148183a2dc94dcf8716c9203">VectorType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_parameterizable.html#a2ad5e2e60b2b352988b41f46024d790b">ParameterVectorType</a></td></tr>
<tr class="separator:a2ad5e2e60b2b352988b41f46024d790b inherit pub_types_classshark_1_1_i_parameterizable"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Clusters defined by centroids. </p>
<dl class="section user"><dt></dt><dd><a class="el" href="classshark_1_1_centroids.html" title="Clusters defined by centroids.">Centroids</a> are an elementary way to define clusters by means of the one-nearest-neighbor rule. This rule defines a hard clustering decision.</dd></dl>
<dl class="section user"><dt></dt><dd>The <a class="el" href="classshark_1_1_centroids.html" title="Clusters defined by centroids.">Centroids</a> class uses inverse distances to compute soft clustering memberships. This is arbitrary and can be changed by overriding the membershipKernel function. </dd></dl>

<p class="definition">Definition at line <a class="el" href="_centroids_8h_source.html#l00059">59</a> of file <a class="el" href="_centroids_8h_source.html">Centroids.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="ab83a899ae20f7e40bfbe6e84688b9401" name="ab83a899ae20f7e40bfbe6e84688b9401"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab83a899ae20f7e40bfbe6e84688b9401">&#9670;&#160;</a></span>Centroids() <span class="overload">[1/3]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_d_l_l_support_8h.html#a54b73283f7f70b27fbd8ac5d4621827f">SHARK_EXPORT_SYMBOL</a> shark::Centroids::Centroids </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Default constructor. </p>

</div>
</div>
<a id="a2679c9e18bee09d905fdc51fafead23c" name="a2679c9e18bee09d905fdc51fafead23c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2679c9e18bee09d905fdc51fafead23c">&#9670;&#160;</a></span>Centroids() <span class="overload">[2/3]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_d_l_l_support_8h.html#a54b73283f7f70b27fbd8ac5d4621827f">SHARK_EXPORT_SYMBOL</a> shark::Centroids::Centroids </td>
          <td>(</td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>centroids</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>dimension</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Constructor</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">centroids</td><td>number of centroids in the model (initially zero) </td></tr>
    <tr><td class="paramname">dimension</td><td>dimension of the input space, and thus of the centroids </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a26f48dd5f3fc482be5d09c8b706a883b" name="a26f48dd5f3fc482be5d09c8b706a883b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a26f48dd5f3fc482be5d09c8b706a883b">&#9670;&#160;</a></span>Centroids() <span class="overload">[3/3]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_d_l_l_support_8h.html#a54b73283f7f70b27fbd8ac5d4621827f">SHARK_EXPORT_SYMBOL</a> shark::Centroids::Centroids </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classshark_1_1_data.html">Data</a>&lt; RealVector &gt; const &amp;&#160;</td>
          <td class="paramname"><em>centroids</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Constructor</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">centroids</td><td>centroid vectors </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a8dcfd9a069a3ea8456e126138f3dee37" name="a8dcfd9a069a3ea8456e126138f3dee37"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8dcfd9a069a3ea8456e126138f3dee37">&#9670;&#160;</a></span>centroids()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classshark_1_1_data.html">Data</a>&lt; RealVector &gt; const  &amp; shark::Centroids::centroids </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>read access to the centroid vectors </p>

<p class="definition">Definition at line <a class="el" href="_centroids_8h_source.html#l00100">100</a> of file <a class="el" href="_centroids_8h_source.html">Centroids.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_centroids.html#a8e83776854b0e78d1357e7ef880db67f">m_centroids</a>.</p>

<p class="reference">Referenced by <a class="el" href="_k_means_tutorial_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main()</a>.</p>

</div>
</div>
<a id="aa60e316c9166e3a61903dceadfdd0785" name="aa60e316c9166e3a61903dceadfdd0785"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa60e316c9166e3a61903dceadfdd0785">&#9670;&#160;</a></span>distances()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_d_l_l_support_8h.html#a54b73283f7f70b27fbd8ac5d4621827f">SHARK_EXPORT_SYMBOL</a> RealMatrix shark::Centroids::distances </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classshark_1_1_abstract_clustering.html#a6865af40b0cab718706e9360b29f2a2c">BatchInputType</a> const &amp;&#160;</td>
          <td class="paramname"><em>patterns</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Computes the distances of each pattern to all cluster centers. </p>

</div>
</div>
<a id="a15454f974bdf8167ef231941a7a54c6b" name="a15454f974bdf8167ef231941a7a54c6b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a15454f974bdf8167ef231941a7a54c6b">&#9670;&#160;</a></span>initFromData() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_d_l_l_support_8h.html#a54b73283f7f70b27fbd8ac5d4621827f">SHARK_EXPORT_SYMBOL</a> void shark::Centroids::initFromData </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceshark.html#a3bbb2342e6c3a856ef63e37f8a02396a">ClassificationDataset</a> const &amp;&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>noClusters</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>noClasses</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>initialize centroids from labeled data: take the first data points with different labels; if there are more centroids than classes, the remaining centroids are filled with the first elements in the data set</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">data</td><td>dataset from which to take the centroids </td></tr>
    <tr><td class="paramname">noClusters</td><td>number of centroids in the model, default 0 is mapped to the number of classes in the data set </td></tr>
    <tr><td class="paramname">noClasses</td><td>number of clases in the dataset, default 0 means that the number is computed <br  />
 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a43ac4993cd3d7178e77740e7831869e5" name="a43ac4993cd3d7178e77740e7831869e5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a43ac4993cd3d7178e77740e7831869e5">&#9670;&#160;</a></span>initFromData() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_d_l_l_support_8h.html#a54b73283f7f70b27fbd8ac5d4621827f">SHARK_EXPORT_SYMBOL</a> void shark::Centroids::initFromData </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classshark_1_1_data.html">Data</a>&lt; RealVector &gt; const &amp;&#160;</td>
          <td class="paramname"><em>dataset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>noClusters</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>initialize centroids from unlabeled data: take a random subset of data points</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dataset</td><td>dataset from which to take the centroids </td></tr>
    <tr><td class="paramname">noClusters</td><td>number of centroids in the model </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a162b069a4d71fcec6e7dae5c8251cb2f" name="a162b069a4d71fcec6e7dae5c8251cb2f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a162b069a4d71fcec6e7dae5c8251cb2f">&#9670;&#160;</a></span>inputShape()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classshark_1_1_shape.html">Shape</a> shark::Centroids::inputShape </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>return the dimension of the inputs </p>

<p>Implements <a class="el" href="classshark_1_1_abstract_clustering.html#a877c93a51f9416ce0f7dec4645086fc8">shark::AbstractClustering&lt; RealVector &gt;</a>.</p>

<p class="definition">Definition at line <a class="el" href="_centroids_8h_source.html#l00092">92</a> of file <a class="el" href="_centroids_8h_source.html">Centroids.h</a>.</p>

<p class="reference">References <a class="el" href="group__shark__globals.html#ga6231b46b09731352a3cac40709a9625f">shark::dataDimension()</a>, and <a class="el" href="classshark_1_1_centroids.html#a8e83776854b0e78d1357e7ef880db67f">m_centroids</a>.</p>

</div>
</div>
<a id="a76f29a0b624229842ae413d8538a7e72" name="a76f29a0b624229842ae413d8538a7e72"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a76f29a0b624229842ae413d8538a7e72">&#9670;&#160;</a></span>membershipKernel()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="_d_l_l_support_8h.html#a54b73283f7f70b27fbd8ac5d4621827f">SHARK_EXPORT_SYMBOL</a> double shark::Centroids::membershipKernel </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>dist</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Compute unnormalized membership from distance. The default implementation is to return exp(-distance) </p>

</div>
</div>
<a id="a82a973c9374f34c44c68fd3c1a15f0d2" name="a82a973c9374f34c44c68fd3c1a15f0d2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a82a973c9374f34c44c68fd3c1a15f0d2">&#9670;&#160;</a></span>name()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::string shark::Centroids::name </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>From <a class="el" href="classshark_1_1_i_nameable.html" title="This class is an interface for all objects which can have a name.">INameable</a>: return the class name. </p>

<p>Reimplemented from <a class="el" href="classshark_1_1_i_nameable.html#a9893f99314de30cd472e649c235d0db4">shark::INameable</a>.</p>

<p class="definition">Definition at line <a class="el" href="_centroids_8h_source.html#l00079">79</a> of file <a class="el" href="_centroids_8h_source.html">Centroids.h</a>.</p>

</div>
</div>
<a id="a3a1d11a1cee40cfb080b56ba037920b9" name="a3a1d11a1cee40cfb080b56ba037920b9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3a1d11a1cee40cfb080b56ba037920b9">&#9670;&#160;</a></span>numberOfClusters()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_d_l_l_support_8h.html#a54b73283f7f70b27fbd8ac5d4621827f">SHARK_EXPORT_SYMBOL</a> std::size_t shark::Centroids::numberOfClusters </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>return the number of centroids in the model </p>

<p>Implements <a class="el" href="classshark_1_1_abstract_clustering.html#a2c913637b84340135b606912228f5851">shark::AbstractClustering&lt; RealVector &gt;</a>.</p>

</div>
</div>
<a id="a3b61acaed4a72c56a3c3e22918e0b1ae" name="a3b61acaed4a72c56a3c3e22918e0b1ae"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3b61acaed4a72c56a3c3e22918e0b1ae">&#9670;&#160;</a></span>numberOfParameters()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_d_l_l_support_8h.html#a54b73283f7f70b27fbd8ac5d4621827f">SHARK_EXPORT_SYMBOL</a> std::size_t shark::Centroids::numberOfParameters </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>from <a class="el" href="classshark_1_1_i_parameterizable.html" title="Top level interface for everything that holds parameters.">IParameterizable</a> </p>

<p>Reimplemented from <a class="el" href="classshark_1_1_i_parameterizable.html#aed1e8d1d4dbde387e2f6a25141ed3a20">shark::IParameterizable&lt; VectorType &gt;</a>.</p>

</div>
</div>
<a id="aeda09ff6d0c326df4c90eb3ebe2d214a" name="aeda09ff6d0c326df4c90eb3ebe2d214a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aeda09ff6d0c326df4c90eb3ebe2d214a">&#9670;&#160;</a></span>parameterVector()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_d_l_l_support_8h.html#a54b73283f7f70b27fbd8ac5d4621827f">SHARK_EXPORT_SYMBOL</a> RealVector shark::Centroids::parameterVector </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>from <a class="el" href="classshark_1_1_i_parameterizable.html" title="Top level interface for everything that holds parameters.">IParameterizable</a> </p>

<p>Reimplemented from <a class="el" href="classshark_1_1_i_parameterizable.html#afaa2ba692ab64a0edbff60d7ee6794db">shark::IParameterizable&lt; VectorType &gt;</a>.</p>

</div>
</div>
<a id="aac250dde37c2e65581d3f9714891e04d" name="aac250dde37c2e65581d3f9714891e04d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aac250dde37c2e65581d3f9714891e04d">&#9670;&#160;</a></span>read()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_d_l_l_support_8h.html#a54b73283f7f70b27fbd8ac5d4621827f">SHARK_EXPORT_SYMBOL</a> void shark::Centroids::read </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceshark.html#ada68729491840669e47c8ad42282424f">InArchive</a> &amp;&#160;</td>
          <td class="paramname"><em>archive</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>from <a class="el" href="classshark_1_1_i_serializable.html" title="Abstracts serializing functionality.">ISerializable</a> </p>

<p>Reimplemented from <a class="el" href="classshark_1_1_abstract_clustering.html#a716046b5e610f0a26e3462d8dda27f45">shark::AbstractClustering&lt; RealVector &gt;</a>.</p>

</div>
</div>
<a id="a45d2dd06b31f49dc53a4697e8d368693" name="a45d2dd06b31f49dc53a4697e8d368693"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a45d2dd06b31f49dc53a4697e8d368693">&#9670;&#160;</a></span>setCentroids()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void shark::Centroids::setCentroids </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classshark_1_1_data.html">Data</a>&lt; RealVector &gt; const &amp;&#160;</td>
          <td class="paramname"><em>newCentroids</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>overwrite the centroid vectors </p>

<p class="definition">Definition at line <a class="el" href="_centroids_8h_source.html#l00105">105</a> of file <a class="el" href="_centroids_8h_source.html">Centroids.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_centroids.html#a8e83776854b0e78d1357e7ef880db67f">m_centroids</a>.</p>

</div>
</div>
<a id="a130828c5db33fe9c2b8a839a972889d3" name="a130828c5db33fe9c2b8a839a972889d3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a130828c5db33fe9c2b8a839a972889d3">&#9670;&#160;</a></span>setParameterVector()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_d_l_l_support_8h.html#a54b73283f7f70b27fbd8ac5d4621827f">SHARK_EXPORT_SYMBOL</a> void shark::Centroids::setParameterVector </td>
          <td>(</td>
          <td class="paramtype">RealVector const &amp;&#160;</td>
          <td class="paramname"><em>newParameters</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>from <a class="el" href="classshark_1_1_i_parameterizable.html" title="Top level interface for everything that holds parameters.">IParameterizable</a> </p>

<p>Reimplemented from <a class="el" href="classshark_1_1_i_parameterizable.html#ad5e35d1a10ff36fa72ea787baa40e9ad">shark::IParameterizable&lt; VectorType &gt;</a>.</p>

</div>
</div>
<a id="ac8b603c938cfa98e3da02cd5f704d7f8" name="ac8b603c938cfa98e3da02cd5f704d7f8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac8b603c938cfa98e3da02cd5f704d7f8">&#9670;&#160;</a></span>softMembership() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_d_l_l_support_8h.html#a54b73283f7f70b27fbd8ac5d4621827f">SHARK_EXPORT_SYMBOL</a> RealMatrix shark::Centroids::softMembership </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classshark_1_1_abstract_clustering.html#a6865af40b0cab718706e9360b29f2a2c">BatchInputType</a> const &amp;&#160;</td>
          <td class="paramname"><em>patterns</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>From <a class="el" href="classshark_1_1_abstract_clustering.html" title="Base class for clustering.">AbstractClustering</a>: Compute cluster memberships for a batch of patterns. </p>

<p>Reimplemented from <a class="el" href="classshark_1_1_abstract_clustering.html#ad6babdbb7b5979c5651698982fea7ca0">shark::AbstractClustering&lt; RealVector &gt;</a>.</p>

</div>
</div>
<a id="a27c10e06b07d4e747db2cfc939020e5f" name="a27c10e06b07d4e747db2cfc939020e5f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a27c10e06b07d4e747db2cfc939020e5f">&#9670;&#160;</a></span>softMembership() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_d_l_l_support_8h.html#a54b73283f7f70b27fbd8ac5d4621827f">SHARK_EXPORT_SYMBOL</a> RealVector shark::Centroids::softMembership </td>
          <td>(</td>
          <td class="paramtype">RealVector const &amp;&#160;</td>
          <td class="paramname"><em>pattern</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>from <a class="el" href="classshark_1_1_abstract_clustering.html" title="Base class for clustering.">AbstractClustering</a>: Compute cluster memberships. </p>

<p>Reimplemented from <a class="el" href="classshark_1_1_abstract_clustering.html#abccfaab4d2d5c26ff5a16d7b085365d1">shark::AbstractClustering&lt; RealVector &gt;</a>.</p>

</div>
</div>
<a id="a47f8243d170bf0c732a7c100b47574b5" name="a47f8243d170bf0c732a7c100b47574b5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a47f8243d170bf0c732a7c100b47574b5">&#9670;&#160;</a></span>write()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_d_l_l_support_8h.html#a54b73283f7f70b27fbd8ac5d4621827f">SHARK_EXPORT_SYMBOL</a> void shark::Centroids::write </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceshark.html#af4f8eb8e9618f5236b71bbcb12b8a524">OutArchive</a> &amp;&#160;</td>
          <td class="paramname"><em>archive</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>from <a class="el" href="classshark_1_1_i_serializable.html" title="Abstracts serializing functionality.">ISerializable</a> </p>

<p>Reimplemented from <a class="el" href="classshark_1_1_abstract_clustering.html#a1256454c153c93d532738311bf7600a0">shark::AbstractClustering&lt; RealVector &gt;</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a8e83776854b0e78d1357e7ef880db67f" name="a8e83776854b0e78d1357e7ef880db67f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8e83776854b0e78d1357e7ef880db67f">&#9670;&#160;</a></span>m_centroids</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classshark_1_1_data.html">Data</a>&lt;RealVector&gt; shark::Centroids::m_centroids</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>centroid vectors </p>

<p class="definition">Definition at line <a class="el" href="_centroids_8h_source.html#l00147">147</a> of file <a class="el" href="_centroids_8h_source.html">Centroids.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_centroids.html#a8dcfd9a069a3ea8456e126138f3dee37">centroids()</a>, <a class="el" href="classshark_1_1_centroids.html#a162b069a4d71fcec6e7dae5c8251cb2f">inputShape()</a>, and <a class="el" href="classshark_1_1_centroids.html#a45d2dd06b31f49dc53a4697e8d368693">setCentroids()</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>include/shark/Models/Clustering/<a class="el" href="_centroids_8h_source.html">Centroids.h</a></li>
</ul>
</div><!-- contents -->
</div>
</body>
</html>
